package com.cfl.user.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.cfl.model.User;
import com.cfl.user.fallback.UserFeignFallback;

@FeignClient(name="ticketcloud-user-module", fallback=UserFeignFallback.class)
public interface UserFeign {

	/**
	 * 获取用户
	 * @param name 用户名
	 * @return
	 */
	@RequestMapping(value="find_user")
	User findUserByName(@RequestParam("name") String name);
	
	/**
	 * 获取用户
	 * @param name 用户名
	 * @param password 密码
	 * @return
	 */
	@RequestMapping(value="find_user_name_password")
	User findUserByNameAndPassword(@RequestParam("name")String name, @RequestParam("password")String password);
	
	/**
	 * 添加用户
	 * @param name
	 * @param password
	 * @return
	 */
	@RequestMapping(value="add_user_name_password")
	Boolean addUser(@RequestParam("name")String name, @RequestParam("password")String password);
}
